package cn.wei.reallyenjoy.diary.service;

import cn.wei.reallyenjoy.common.result.Result;
import cn.wei.reallyenjoy.diary.service.impl.CommentsHystrixFallbackServiceImpl;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: wei
 * @Date: 2021/12/04/17:26
 */
@Component
@FeignClient(value = "COMMENT-SERVICE",fallback = CommentsHystrixFallbackServiceImpl.class)
public interface CommentsHystrixService {
    //根据日记id获取评论列表
    @GetMapping(value = "/comments/getCommentsByDiaryId/{diaryId}")
    public Result getCommentsByDiaryId(@PathVariable("diaryId") Long diaryId);
}
